
#ifndef IntPtr_h
#define IntPtr_h

#include "Object.h"
#include "String.h"

namespace Riccsson
{
	namespace System
	{
		// Summary:
		//     A platform-specific type that is used to represent a pointer or a handle.
		////[Serializable]
		////[ComVisible(true)]
		struct IntPtr
			: Object
			//, ISerializable
		{
			// Summary:
			//     A read-only field that represents a pointer or handle that has been initialized
			//     to zero.
			public: static readonly IntPtr& Zero;

			public: IntPtr()
			{

			}

			//
			// Summary:
			//     Initializes a new instance of System.IntPtr using the specified 32-bit pointer
			//     or handle.
			//
			// Parameters:
			//   value:
			//     A pointer or handle contained in a 32-bit signed integer.
			//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			//[SecuritySafeCritical]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: IntPtr(int value)
			{
				throw;
			}

			//
			// Summary:
			//     Initializes a new instance of System.IntPtr using the specified 64-bit pointer.
			//
			// Parameters:
			//   value:
			//     A pointer or handle contained in a 64-bit signed integer.
			//
			// Exceptions:
			//   System.OverflowException:
			//     On a 32-bit platform, value is too large or too small to represent as an
			//     System.IntPtr.
			//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			//[SecuritySafeCritical]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: IntPtr(long value)
			{
				throw;
			}

			//
			// Summary:
			//     Initializes a new instance of System.IntPtr using the specified pointer to
			//     an unspecified type.
			//
			// Parameters:
			//   value:
			//     A pointer to an unspecified type.
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			//[SecurityCritical]
			public: IntPtr(void* value)
			{
				throw;
			}

			////
			//// Summary:
			////     Converts the value of a 32-bit signed integer to an System.IntPtr.
			////
			//// Parameters:
			////   value:
			////     A 32-bit signed integer.
			////
			//// Returns:
			////     A new instance of System.IntPtr initialized to value.
			////[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			////[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//public: static /*explicit*/ operator IntPtr(int value)
			//{
			//	throw;
			//}
			//
			////
			//// Summary:
			////     Converts the value of the specified System.IntPtr to a 32-bit signed integer.
			////
			//// Parameters:
			////   value:
			////     The pointer or handle to convert.
			////
			//// Returns:
			////     The contents of value.
			////
			//// Exceptions:
			////   System.OverflowException:
			////     On a 64-bit platform, the value of value is too large to represent as a 32-bit
			////     signed integer.
			////[SecuritySafeCritical]
			////[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//public: static /*explicit*/ operator int(IntPtr value)
			//{
			//	throw;
			//}
			//
			////
			//// Summary:
			////     Converts the value of the specified System.IntPtr to a pointer to an unspecified
			////     type.
			////
			//// Parameters:
			////   value:
			////     The pointer or handle to convert.
			////
			//// Returns:
			////     The contents of value.
			////[CLSCompliant(false)]
			////[SecuritySafeCritical]
			////[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//public: static /*explicit*/ operator void*(IntPtr value)
			//{
			//	throw;
			//}
			//
			////
			//// Summary:
			////     Converts the value of the specified System.IntPtr to a 64-bit signed integer.
			////
			//// Parameters:
			////   value:
			////     The pointer or handle to convert.
			////
			//// Returns:
			////     The contents of value.
			////[SecuritySafeCritical]
			////[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//public: static /*explicit*/ operator long(IntPtr value)
			//{
			//	throw;
			//}
			//
			////
			//// Summary:
			////     Converts the value of a 64-bit signed integer to an System.IntPtr.
			////
			//// Parameters:
			////   value:
			////     A 64-bit signed integer.
			////
			//// Returns:
			////     A new instance of System.IntPtr initialized to value.
			////
			//// Exceptions:
			////   System.OverflowException:
			////     On a 32-bit platform, value is too large to represent as an System.IntPtr.
			////[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			////[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//public: static /*explicit*/ operator IntPtr(long value)
			//{
			//	throw;
			//}
			//
			////
			//// Summary:
			////     Converts the specified pointer to an unspecified type to an System.IntPtr.
			////
			//// Parameters:
			////   value:
			////     A pointer to an unspecified type.
			////
			//// Returns:
			////     A new instance of System.IntPtr initialized to value.
			////[CLSCompliant(false)]
			////[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			////[SecurityCritical]
			////[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			//public: static /*explicit*/ operator IntPtr(void* value)
			//{
			//	throw;
			//}


			// Summary:
			//     Gets the size of this instance.
			//
			// Returns:
			//     The size of a pointer or handle in this process, measured in bytes. The value
			//     of this property is 4 in a 32-bit process, and 8 in a 64-bit process. You
			//     can define the process type by setting the /platform switch when you compile
			//     your code with the C# and Visual Basic compilers.
			//public: static int Size { get; }

			// Summary:
			//     Adds an offset to the value of a pointer.
			//
			// Parameters:
			//   pointer:
			//     The pointer to add the offset to.
			//
			//   offset:
			//     The offset to add.
			//
			// Returns:
			//     A new pointer that reflects the addition of offset to pointer.
			//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static IntPtr Add(IntPtr pointer, int offset)
			{
				throw;
			}

			//
			// Summary:
			//     Returns a value indicating whether this instance is equal to a specified
			//     object.
			//
			// Parameters:
			//   obj:
			//     An object to compare with this instance or null.
			//
			// Returns:
			//     true if obj is an instance of System.IntPtr and equals the value of this
			//     instance; otherwise, false.
			//[SecuritySafeCritical]
			public: override bool Equals(const object* obj)
			{
				throw;
			}

			//
			// Summary:
			//     Returns the hash code for this instance.
			//
			// Returns:
			//     A 32-bit signed integer hash code.
			//[SecuritySafeCritical]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: override int GetHashCode()
			{
				throw;
			}

			//
			// Summary:
			//     Subtracts an offset from the value of a pointer.
			//
			// Parameters:
			//   pointer:
			//     The pointer to subtract the offset from.
			//
			//   offset:
			//     The offset to subtract.
			//
			// Returns:
			//     A new pointer that reflects the subtraction of offset from pointer.
			//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: static IntPtr Subtract(IntPtr pointer, int offset)
			{
				throw;
			}

			//
			// Summary:
			//     Converts the value of this instance to a 32-bit signed integer.
			//
			// Returns:
			//     A 32-bit signed integer equal to the value of this instance.
			//
			// Exceptions:
			//   System.OverflowException:
			//     On a 64-bit platform, the value of this instance is too large or too small
			//     to represent as a 32-bit signed integer.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[SecuritySafeCritical]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: int ToInt32()
			{
				throw;
			}

			//
			// Summary:
			//     Converts the value of this instance to a 64-bit signed integer.
			//
			// Returns:
			//     A 64-bit signed integer equal to the value of this instance.
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[SecuritySafeCritical]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: long ToInt64()
			{
				throw;
			}

			//
			// Summary:
			//     Converts the value of this instance to a pointer to an unspecified type.
			//
			// Returns:
			//     A pointer to System.Void; that is, a pointer to memory containing data of
			//     an unspecified type.
			//[CLSCompliant(false)]
			//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
			//[SecuritySafeCritical]
			//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
			public: void* ToPointer()
			{
				throw;
			}

			//
			// Summary:
			//     Converts the numeric value of the current System.IntPtr object to its equivalent
			//     string representation.
			//
			// Returns:
			//     The string representation of the value of this instance.
			//[SecuritySafeCritical]
			public: override GC_PTR<string> ToString()
			{
				throw;
			}

			//
			// Summary:
			//     Converts the numeric value of the current System.IntPtr object to its equivalent
			//     string representation.
			//
			// Parameters:
			//   format:
			//     A format specification that governs how the current System.IntPtr object
			//     is converted.
			//
			// Returns:
			//     The string representation of the value of the current System.IntPtr object.
			//[SecuritySafeCritical]
			public: GC_PTR<string> ToString(string* format)
			{
				throw;
			}

		};


		// Summary:
		//     Subtracts an offset from the value of a pointer.
		//
		// Parameters:
		//   pointer:
		//     The pointer to subtract the offset from.
		//
		//   offset:
		//     The offset to subtract.
		//
		// Returns:
		//     A new pointer that reflects the subtraction of offset from pointer.
		//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
		//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
		IntPtr operator -(IntPtr& pointer, int offset);

		//
		// Summary:
		//     Determines whether two specified instances of System.IntPtr are not equal.
		//
		// Parameters:
		//   value1:
		//     The first pointer or handle to compare.
		//
		//   value2:
		//     The second pointer or handle to compare.
		//
		// Returns:
		//     true if value1 does not equal value2; otherwise, false.
		//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
		//[SecuritySafeCritical]
		//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
		bool operator !=(IntPtr& value1, IntPtr& value2);

		//
		// Summary:
		//     Adds an offset to the value of a pointer.
		//
		// Parameters:
		//   pointer:
		//     The pointer to add the offset to.
		//
		//   offset:
		//     The offset to add.
		//
		// Returns:
		//     A new pointer that reflects the addition of offset to pointer.
		//[ReliabilityContract(Consistency.MayCorruptInstance, Cer.MayFail)]
		//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
		IntPtr operator +(IntPtr& pointer, int offset);

		//
		// Summary:
		//     Determines whether two specified instances of System.IntPtr are equal.
		//
		// Parameters:
		//   value1:
		//     The first pointer or handle to compare.
		//
		//   value2:
		//     The second pointer or handle to compare.
		//
		// Returns:
		//     true if value1 equals value2; otherwise, false.
		//[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
		//[SecuritySafeCritical]
		//[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
		bool operator ==(IntPtr& value1, IntPtr& value2);
	}
}

#endif
